{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Yes\n"
     ]
    }
   ],
   "source": [
    "# 田忌赛马\n",
    "\n",
    "# 战力值\n",
    "# arr1 = [2,3,4,5,6]  \n",
    "# arr2 = [1,2,3,4,5]\n",
    "arr1 = list(map(int, input().split()))\n",
    "arr2 = list(map(int, input().split()))\n",
    "\n",
    "# 初始时2边都是0分\n",
    "score1 = 0   \n",
    "score2 = 0\n",
    "\n",
    "for i in range(len(arr1)):\n",
    "    if arr1[i] > arr2[i]:\n",
    "        score1 = score1 + 1 # 得1分\n",
    "        score2 = score2 - 1 # 得-1分\n",
    "    else:\n",
    "        score1 = score1 - 1  # 得-1分\n",
    "        score2 = score2 + 1  # 得1分\n",
    "\n",
    "if score1 > score2:\n",
    "    print('Yes')\n",
    "else:\n",
    "    print('no')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2 3 5 7 "
     ]
    }
   ],
   "source": [
    "# 判断n是不是质数\n",
    "def isPrime(n):\n",
    "    if n<2:\n",
    "        return False\n",
    "    for i in range(2, int(n**0.5)+1):\n",
    "        if n % i == 0:\n",
    "            return False\n",
    "        \n",
    "    return True\n",
    "\n",
    "n = int(input())  # 输入数据\n",
    "a = 10**(n-1)\n",
    "b = a*10\n",
    "res = []\n",
    "for x in range(a, b):\n",
    "    if isPrime(x) and isPrime(int(str(x)[::-1])):\n",
    "        res.append(x)\n",
    "\n",
    "if len(res) ==0:\n",
    "    print('null')\n",
    "else:\n",
    "    for x in res:\n",
    "        print(x, end=' ')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
